package cn.exrick.xboot.base.entity

import cn.exrick.xboot.core.base.XbootBaseEntity
import cn.exrick.xboot.core.base.XbootBaseEntityKt
import cn.exrick.xboot.core.common.utils.SnowFlakeUtil
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import org.hibernate.annotations.DynamicInsert
import org.hibernate.annotations.DynamicUpdate
import javax.persistence.Column
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table

/**
 * @author Fei
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "se_hidden_danger_record")
@TableName("se_hidden_danger_record")
@ApiModel(value = "隐患记录")
data class HiddenDangerRecord(

        @ApiModelProperty("企业id")
        var enterpriseUserId: String? = null,

        @ApiModelProperty("隐患内容")
        @Column(length = 1000)
        var hiddenDangerContent: String? = null,

        @ApiModelProperty("隐患依据")
        @Column(length = 1000)
        var hiddenDangerAccording: String? = null,

        @ApiModelProperty("隐患图片 (逗号拼接)")
        var hiddenDangerPics: String? = null

): XbootBaseEntityKt() {

    @Id
    @TableId
    override var id: String = SnowFlakeUtil.nextId().toString()

    companion object {
        private const val serialVersionUID = 1L

    }
}